﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kokomo.Mirror.CliMetadata.Signatures;

namespace Kokomo.Mirror.CliMetadata
{
	struct TypeSpecRef
	{
		public int HeapIndex { get; private set; }
		public TypeSpec TypeSpec { get; private set; }

		public TypeSpecRef(
			int heapIndex,
			TypeSpec typeSpec
			)
			: this()
		{
			this.HeapIndex = heapIndex;
			this.TypeSpec = typeSpec;
		}

		//public override string ToString()
		//{
		//    if (this.Data == null)
		//    {
		//        return string.Format("[0x{0:X8}]", this.HeapIndex);
		//    }
		//    else
		//    {
		//        int byteCount = Math.Min(16, this.Data.Length);
		//        StringBuilder builder = new StringBuilder(12 + byteCount * 3);
		//        builder.AppendFormat("[0x{0:X8}]", this.HeapIndex);
		//        for (int i = 0; i < byteCount; i++)
		//        {
		//            builder.AppendFormat(" {0:X2}", this.Data[i]);
		//        }

		//        return builder.ToString();
		//    }
		//}
	}
}
